package com.zjj.learn.designmodel.work.adapter;

/**
 * 适配器类
 **/
public class ChinaComputerAdapter implements PlugInterface{

    private final ChinaComputer chinaComputer;

    public ChinaComputerAdapter(ChinaComputer chinaComputer) {
        this.chinaComputer = chinaComputer;
    }

    @Override
    public void power() {
        System.out.println("在国外要为国产电脑充电了");
        System.out.println("使用国外的插头，使用国外的电压规则...将这个规则传递给适配器");
        System.out.println("适配器作用1：将插头格式转化成国产的的格式");
        System.out.println("适配器作用2：将电压转化成国产电脑适合的");
        chinaComputer.power();

    }
}
